package com.pactera.jep.service.yapin.common;

public class CommonPage {

    private Integer pageNumber;

    private Integer pageSize;

    private Integer startRow;

    public Integer getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber == null ? 1 : pageNumber;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize == null ? 10 : pageSize;
    }

    public Integer getStartRow() {
        return startRow;
    }

    public void setStartRow(Integer pageNumber,Integer pageSize) {
        this.startRow = pageNumber == 1 ? 0 : (pageNumber - 1) * pageSize;
    }
}
